-- GENERATED SPELL FOR [Apexis Guardian] --


function spell0_22275(pUnit, Event) --@Crystal Prison,n/a--
pUnit:FullCastSpellOnTarget(40846,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22275', 8000, 1)
end

function spell1_22275(pUnit, Event) --@Throw,n/a--
pUnit:FullCastSpellOnTarget(40843,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22275', 603, 1)
end

function Sorts_22275(pUnit, Event)
local choix_sorts_22275 = math.random(0, 1)
if choix_sorts_22275 == 0 then
pUnit:RegisterEvent('spell0_22275', 1, 1)
end
if choix_sorts_22275 == 1 then
pUnit:RegisterEvent('spell1_22275', 1, 1)
end
end

function mob22275_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_22275', math.random(1500, 3000), 1)
end

function mob22275_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22275_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22275_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(22275, 1, 'mob22275_Action')
RegisterUnitEvent(22275, 2, 'mob22275_Leave')
RegisterUnitEvent(22275, 3, 'mob22275_Kill')
RegisterUnitEvent(22275, 4, 'mob22275_Die')
